import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wangxin
 * Date: 2024-08-02
 * Time: 15:53
 */
public class Demo3 {
//    public static void main(String[] args) throws IOException {
//        File file = new File("./text3.txt");
//        System.out.println(file.exists());
//        System.out.println(file.createNewFile());
//        System.out.println(file.exists());
//        System.out.println(file.delete());
//        System.out.println(file.exists());
//
//    }
public static void main(String[] args) throws IOException {
         File file = new File("./text3.txt");
         System.out.println(file.exists());
         System.out.println(file.createNewFile());
         file.deleteOnExit();
    System.out.println(file.exists());

}

}
